<!DOCTYPE html>
<html>
{include file="public/head" /}
<body class="zanpian-body">
<section class="content">
<div class="row">
<div class="col-md-12">
<div class="callout callout-title">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                <h4>{$nav.title}</h4>
                {notempty name="nav.remark"}
                <p>{$nav.remark}</p>
                {/notempty}
</div> 
          <div class="nav-tabs-custom">
            <ul class="nav nav-tabs">
              <li><a class="ajax-url" href="#0" url="{:url('index')}" data-toggle="tab">列表</a></li>
             <li class="active"><a class="ajax-url" href="#1" url="{:url('index',array('action'=>1))}" data-toggle="tab">树形</a></li>               
            </ul> 
<div class="panel-body" id="contents">
<div class="panel-tool">
<div class="row">
              <div class="col-md-12 col-sm-12 col-xs-12 m10">
                <div id="toolbar" class="toolbar">
                <a href="{:url('up')}" form="#list" class="btn btn-primary btn-disabled ajax-post disabled">更新</a> <a href="{:url('add')}" data-name="添加配置" class="btn btn-success btn-add btn-editone"><i class="fa fa-plus"></i> 添加</a> <a  href="{:url('status',array('status'=>1))}" form="#list" class="confirm btn btn-info btn-disabled  ajax-post disabled"><i class="fa fa-unlock"></i> 显示</a> <a  href="{:url('status',array('status'=>0))}" form="#list" class="confirm btn btn-warning btn-disabled  ajax-post disabled"><i class="fa fa-lock"></i> 隐藏</a> <a  href="{:url('del')}" form="#list" class="confirm btn btn-danger btn-del btn-disabled ajax-post disabled"><i class="fa fa-trash"></i> 删除</a><span id="selectedChks">已选择<strong></strong>记录</span>
                </div>
                <!-- /.toolbar -->
              </div>
            </div>

</div>
<!-- /.panel-tool -->
    <div class="tab-content">
              <form id="list" method="post">
                <table id="table" class="table table-striped table-bordered table-hover" style="margin-top: 0px;" width="100%">
                   <thead>
                    <tr style="height:45px;">
                      <th style="text-align:center;vertical-align: middle; width:5%">
                      <label class="pretty success">
	                   <input type="checkbox" id="checkall" class="delcheckall"> 
	                    <label><i class="mdi mdi-check"></i></label>
	                  </label>
                      </th>
                      <th style="text-align:center;vertical-align: middle;">编号</th>
                      <th style="text-align:center;vertical-align: middle;">标题</th>
                      <th style="text-align:center;vertical-align: middle;">图标</th>
                      <th style="text-align:center;vertical-align: middle;" class="hidden-xs">名称</th>
                      <th style="text-align:center;vertical-align: middle;" class="hidden-xs">规则URL</th>
                      <th style="text-align:center;vertical-align: middle;" class="hidden-xs">排序</th>
                      <th style="text-align:center;vertical-align: middle;" class="hidden-xs">状态</th>
                      <th style="text-align:center;vertical-align: middle;" class="hidden-xs">菜单</th>
                      <th style="text-align:center;vertical-align: middle; "><a href="javascript:;" class="btn btn-success btn-xs btn-toggle"><i class="fa fa-chevron-up"></i></a></th>   
                      <th style="text-align:center;vertical-align: middle;">操作</th>
                    </tr>
                  </thead>                
               <tbody>
               {notempty name="list"}
               {volist name="list" id="menu"}
               <tr {neq name="menu.type" value="2"}style="display: none;"{/neq}{egt name="menu.level" value="3"}style="display: none;"{/egt}>
                <td class="bs-checkbox" style="text-align:center;vertical-align:middle; font-size:14px">
                <label class="pretty success">
                <input name="id[]" type="checkbox" value="{$menu['id']}" id="checkbox"> 
	            <label><i class="mdi mdi-check"></i></label>
	            </label>
                </td>               
                 <td style="text-align:center;vertical-align: middle;">{$menu.id}</td>
                <td style="text-align:left;vertical-align: middle;">{$menu.title_show}{eq name="menu.type" value="2"}<a data-name="添加子类" href="{:url('add',array('pid'=>$menu['id']))}" class="btn-editone"><i class="fa fa-plus" style="color:#F30; margin-left:8px;"></i></a>{/eq}</td>
                
                <td style="text-align:center;vertical-align: middle;"><i class="{$menu.icon}"></i></td>
                <td style="text-align:center;vertical-align: middle;" class="hidden-xs"><input name="title[{$menu['id']}]" class="form-control input-sm" value="{$menu.title}" type="text" style="text-align:center;"></td>
                <td style="text-align:center;vertical-align: middle;" class="hidden-xs"><input name="name[{$menu['id']}]" class="form-control input-sm" value="{$menu.name}" type="text" style="text-align:center;"></td>
                <td style="text-align:center;vertical-align: middle;" class="hidden-xs"><input name="sort[{$menu['id']}]" class="form-control input-sm" value="{$menu.sort}" type="text" style="text-align:center; width:50%; margin:0 auto"></td>
                <td style="text-align:left;vertical-align: middle;"  class="hidden-xs">
                {eq name="menu.status" value="1"}
                 <a class="btn btn-info btn-xs btn-facebook ajax-post" href="{:url('status',array('id'=> $menu['id'],'status'=>0))}">显示</a>{else /}<a class="btn btn-info btn-xs btn-danger ajax-post" href="{:url('status',array('id'=> $menu['id'],'status'=>1))}">隐藏</a>{/eq}
                 </td>
                <td style="text-align:center;vertical-align: middle;"  class="hidden-xs">
                {eq name="menu.type" value="2"}<a class="btn btn-info btn-xs btn-change ajax-post" href="{:url('type',array('id'=> $menu['id'],'status'=>1))}">是</a>{else /}<a class="btn btn-default btn-xs btn-change ajax-post" href="{:url('type',array('id'=> $menu['id'],'status'=>2))}">否</a>{/eq}
                 </td>      
                 <td style="text-align:center;vertical-align: middle;"><a href="javascript:;" data-id="{$menu.id}" data-pid="{$menu.pid}" {eq name="menu.haschild" value="1"} class="btn btn-xs btn-success btn-node-sub"{else /}class="btn btn-xs btn-default  btn-node-sub"{/eq}><i class="fa fa-sitemap"></i></a></td>                         
                <td style="text-align:center;vertical-align: middle;">
                <a href="{:url('edit',array('id'=>$menu['id']))}"  data-name="编辑" class="btn btn-success btn-editone btn-xs" title="编辑"><i class="fa fa-pencil"></i></a> <a href="{:url('del',array('id'=>$menu['id']))}" class="confirm btn btn-danger btn-xs confirm ajax-post" title="删除"><i class="fa fa-trash-o"></i> </a>   
                  </td>
              </tr>
              {/volist}
                 {else/}<tr><td style="text-align:center;vertical-align: middle;" colspan="9" >抱歉，没有找到相关内容！</td></tr>{/notempty} 
            </tbody>
                </table>
              </form>
            </div>
    
         </div>
         <!-- /.panel-body --> 
          </div>
          <!-- /.nav-tabs-custom -->         
        </div>
        </div>
        </section>
{include file="public/footer" /}
<script type="text/javascript">
$(document).ready(function(){
	zanpian.cms.auth();
});	
</script>
</body>
</html>
